import cn.bugstack.mybatis.binding.MapperProxyFactory;
import org.junit.Test;

import java.util.HashMap;
import java.util.Map;

public class ApiTest {
    @Test
    public void test() {
        MapperProxyFactory<IUserDao> mapperProxyFactory = new MapperProxyFactory<>(IUserDao.class);
        Map<String , String> sqlSession = new HashMap<>();
        sqlSession.put("IUserDao.queryUserName", "模拟执行 Mapper.xml 中 SQL 语句的操作：查询用户姓名");
        sqlSession.put("IUserDao.queryUserAge", "模拟执行 Mapper.xml 中 SQL 语句的操作：查询用户年龄");
        IUserDao userDao = mapperProxyFactory.newInstance(sqlSession);
        String  res = userDao.queryUserName("10001");
        System.out.println(res);
    }
}
